package com.javasm.process;

import com.javasm.process.entity.ProcessTask;
import com.javasm.process.entity.TaskStatus;
import com.javasm.sys.SysUser;

import java.util.List;

public interface ProcessService {
    //启动流程
    boolean startProcess(String defName,  String orderId);
    //查询待办任务
    List<ProcessTask> queryToDoTasks(String defName, String loginuser);
    //查询已办任务
    List<ProcessTask> queryDosTasks(String defName, String loginuser, String result);
    //流程跟踪,根据订单id获取该订单审批记录
    List<ProcessTask> getTaskByApplyOrderId(String defName, String orderId);
    //执行审批,返回流程是否结束
    String approve(String defName, ProcessTask task, String loginuser);
    //执行签收
    Boolean claim(String loginuser, ProcessTask task);
    Boolean claim(String loginuser, String orderId);

    List<String> listTodoApplyIds(String defName, String loginUserName);

    List<String> listdoApplyIds(String defName, String loginUserName,String status);
}
